<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------
namespace app\video\behavior\create_audit_complete_after;

/**
 * 更新 视频表 状态
 * @package app\video\behavior\create_audit_complete_after
 * @author jason wang
 */
class updataPlayStatus{
    /**
     * 执行行为 run方法是Behavior唯一的接口
     * @access public
     * @return void
     */
    public function run($params){
    	$VideoId 	 = $params['VideoId'];
        $AuditStatus = $params['AuditStatus'];

        //更新视频表状态
        $map = [];
        $map['video_id'] = $VideoId;
        $play_operation_status = $AuditStatus == 'Normal' ? 1 : 2;
        model('VideoPlay') -> where($map)-> setField('play_operation_status', $play_operation_status);
        
    }
}
